package base.spi;

import org.junit.Test;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * @program JavaBase
 * @description:
 * @author: zhanglu
 * @create: 2022-06-02 14:45:00
 */
public class SpiTest {

    @Test
    public void test01(){
        //配置问价不能换行，换行会报错
        ServiceLoader<JdkSpi> serviceLoader = ServiceLoader.load(JdkSpi.class);
        for (JdkSpi jdkSpi : serviceLoader) {
            jdkSpi.queryInfo("lu");
        }
    }

}
